public class AuthSubTokenCompContrller {
  // should only be used after we have a token
    public string convertTokenToSession { get { 
        string tt = ApexPages.currentPage().getParameters().get('token');
        system.assert(tt!=null,' missing token paramater');
        ApexPages.currentPage().getParameters().remove('token');
        system.debug('TTTTTTTTTTTTTTTTTTTTTTTTTT    '+tt);
        string st = AuthSubUtil.exchangeForSessionToken( tt ) ;
        ApexPages.currentPage().getParameters().put('sesstoken',st);
        system.debug('SSSSSSSSTTTTTTTTTTTTTTTT        '+st);
        system.debug( ApexPages.currentPage().getUrl()); 
        return ApexPages.currentPage().getUrl(); 
    } }
}